-->
<interface name="org.gnome.Shell.Screenshot">
+ <!--
+ InteractiveScreenshot:
+ @success: whether the screenshot was captured
+ @uri: the file where the screenshot was saved
+
+ Shows Shell's interactive screenshot dialog, and lets the
+ user take an interactive screenshot, which is then returned
+ in @filename as png image. It returns a boolean indicating
+ whether the operation was successful or not. The URI of the
+ screenshot will be returned in @uri.
+ -->
+ <method name="InteractiveScreenshot">
+ <arg type="b" direction="out" name="success"/>
+ <arg type="s" direction="out" name="uri"/>
+ </method>
+
<!--
Screenshot:
@filename: The filename for the screenshot
}
}
+ async InteractiveScreenshotAsync(params, invocation) {
+ try {
+ await this._senderChecker.checkInvocation(invocation);
+ } catch (e) {
+ invocation.return_gerror(e);
+ return;
+ }
+
+ Main.screenshotUI.connectObject(
+ 'screenshot-taken', (ui, file) => {
+ Main.screenshotUI.disconnectObject(invocation);
+ invocation.return_value(new GLib.Variant('(bs)', [true, file.get_uri()]));
+ },
+ 'closed', () => {
+ Main.screenshotUI.disconnectObject(invocation);
+ invocation.return_value(new GLib.Variant('(bs)', [false, '']));
+ },
+ invocation);
+
+
+ try {
+ Main.screenshotUI.open(UIMode.SCREENSHOT_ONLY);
+ } catch (e) {
+ Main.screenshotUI.disconnectObject(invocation);
+ invocation.return_value(new GLib.Variant('(bs)', [false, '']));
+ }
+ }
+
async SelectAreaAsync(params, invocation) {
try {
await this._senderChecker.checkInvocation(invocation);